The present invention relates to an apparatus and a method for decoding an MPEG picture stream suitable for use in a digital broadcast receiver, for example. More particularly, the present invention relates to an apparatus and the like for decoding an MPEG picture stream that make it possible to quickly obtain output picture data by decoding, when a predictive coded picture includes an intra slice or an intra macroblock, the intra slice or the intra macroblock of the predictive coded picture after an instruction to start decoding, without waiting for an intra picture to be decoded.
As a picture stream handled in a digital broadcast receiver, there is an MPEG (Motion Picture Experts Group) picture stream. As is well known, MPEG coded data is represented by a hierarchical structure. The hierarchical structure comprises, from the top down: a sequence layer, a GOP (Group of Picture) layer, a picture layer, a slice layer, a macroblock layer, and a block layer.
FIG. 5 shows a sequence layer and a GOP layer. The sequence layer begins with a sequence header and ends with a sequence end. The sequence layer comprises more than one GOP. The GOP layer begins with a GOP header and comprises a plurality of pictures. The first picture is always an I-picture (intra coded picture), followed by a P-picture (predictive coded picture) and a B-picture (bidirectional predictive coded picture).
The I-picture is an intra-frame coded picture, and therefore a single picture can be decoded with only the I-picture. The P-picture is an inter-frame forward-direction predictive coded picture, and transmits its difference with respect to a previous picture, as shown in FIG. 6. A decoding apparatus (decoder) adds the difference to the previous picture and thereby decodes a picture. Thus, the P-picture requires a picture to be referred to first, and the picture decoding uses the I-picture described above as the picture to be referred to and the P-picture created by referring to the I-picture.
The B-picture is a bidirectional predictive coded picture, and transmits its difference with respect to two pictures: a temporally preceding and a temporally succeeding picture, as shown in FIG. 7. The decoding apparatus adds the difference to the preceding and succeeding pictures, and thereby decodes a picture. Thus, the B-picture makes it possible to reduce difference data as compared with the P-picture by referring to two pictures.
FIG. 8 shows an example of an MPEG picture stream formed by I-, P-, and B-pictures. When such an MPEG picture stream is decoded, a conventional method decodes an I-picture, then decodes P-pictures by using a decoding result of the I-picture as a reference picture, and thereafter decodes B-pictures.
FIG. 9 shows a conventional decoding procedure. First, decoding is started at a step ST1. At a step ST2, a first picture is read from a receiving buffer, for example. At a step ST3, operations of the steps ST2 and ST3 are repeated until an I-picture is read.
When an I-picture is read from the stream, the process proceeds to steps ST4 and ST5 to branch according to the type of a read picture. When the read picture is an I-picture, the I-picture is decoded at a step ST6, and then the process proceeds to a step ST7. When the read picture is a P-picture, the P-picture is subjected to forward-direction decoding processing at a step ST8, and then the process proceeds to the step ST7. When the read picture is a B-picture, the B-picture is subjected to bidirectional decoding processing at a step ST9, and then the process proceeds to the step ST7.
At the step ST7, picture data as a decoding result is output. At a step ST10, the next picture is read, and then the process returns to the step ST4 to subject the read picture to decoding processing as described above according to the picture type.
As described above, even when an instruction to start decoding an MPEG picture stream is provided, the conventional decoding apparatus cannot decode P-pictures and B-pictures until the apparatus decodes an I-picture, and therefore a method such as blanking is adopted for the intervening period. Hence, when the digital broadcast receiver selects a channel and thereby changes the MPEG picture stream, for example, picture display on a display unit is interrupted for a moment.
A P-picture and a B-picture may have a small intra coded block unit. An intra coded block enables decoding using only the block and thus does not require a reference picture.